<div id="forum_left_content">
    <div id="post_topic">
        <form method="post" action="<?php echo "$action_path/insert_topic_action.php"; ?>" >
            <h2>Create topic for discussion</h2> </br>
            Topic: <br/><input type="text" size="120"  value="" name="forum_topic"><br/>
            Content:<br/><textarea name="message" rows="4" cols="90" name="forum_content"></textarea><br/>
            <input type="submit" value="Post">
        </form>
    </div>
    <div class="separator"></div>

    <div id="forum_topic">


        <?php

        mysql_connect("localhost","root","");
        mysql_select_db("susudo");



        $select_forum_query="SELECT *, forum.id as forum_id FROM forum JOIN users_profile ON forum.user_id = users_profile.user_id ORDER BY created_at DESC ";

        $forums= mysql_query($select_forum_query);
        
        if ($forums){
        while ($row = mysql_fetch_assoc($forums)) {

            ?>

        <div class="forum_post">
            <h1><a href="frontend.php?page=comment&forum=<?php echo $row['forum_id'];?>"><?php echo $row['forum_topic']; ?></a></h1>
            <h2><?php echo $row['forum_content']; ?></h2>

            <div id="comment_author">
                <img src="images/rating.gif"> Created by: <a href=""><?php echo $row["first_name"]." ". $row["mid_name"]." ".$row["last_name"]; ?></a> &nbsp|&nbsp <a href="frontend.php?page=comment&forum=<?php echo $row['forum_id'];?>"> Comments</a>:23</br>

            </div>
            <div class="separator"></div>
        </div>


        <?php } ?>


         <div id="see_more">
            <a href="">see more</a>.
        </div>

        <?php } else { ?>
         No post found!
        <?php } ?>

       
    </div>
</div>
<div id="right_content">

    <h3>Ad Area</h3>
    <br/>
    <div class="ad_1">
        <img src="images/ad1.jpg"/>

    </div>

    <div class="bottom_ad">
        <div class="ad_2">
            &nbsp;
        </div>

        <div class="ad_3">
            &nbsp;
        </div>

        <div class="clear"> </div>
    </div>
    <div class="clear"> </div>

</div>